﻿//
// Decompiled with: Decompiler.NET, Version=1.3.1.18439, Culture=neutral, PublicKeyToken=null, Version: 1.3.1.18439
// Decompilation Started at: 3/15/2009 10:34:26 PM
// Copyright 2003 - 2004, Jungle Creatures, Inc., All Rights Reserved. 
// Written by Jonathan Pierce, Email: support@junglecreatures.com
//

namespace PatientManagement

{
		
		#region Namespace Import Declarations
		
			using System.Collections;
			using System.ComponentModel;
			using System.Data.Common;
			using System.Data;
			using System.Data.SqlClient;
			using System.Drawing;
			using System;
			using System.Resources;
			using System.Windows.Forms;
			using Utility;
			
		#endregion
		
	public class frmEnterStock : Form
	
	{
		
		#region Fields
			private Button btAdd;
			private Button btExit;
			private Button btSave;
			private Button btUpdate;
			private Button btXoa;
			private ComboBox cboISN;
			private ComboBox cboMucChuan;
			private ComboBox cboSick;
			private Container components;
			private string con;
			private int count;
			private DataGrid dataGrid1;
			private Database_Com db;
			private DataSet ds;
			private DataTable dt;
			public int flag;
			private Label label1;
			private Label label2;
			private Label label3;
			private Label label4;
			private Label label5;
			private Label label6;
			private Label label7;
			private LinkLabel linkTenThuoc;
			private TextBox txtAmount;
			private TextBox txtDonVi;
			private TextBox txtDViChuan;
			private TextBox txtISN;
			private TextBox txtNewMedicine;
			private TextBox txtSoLuongTonKho;
			private TextBox txtSTT;
			private TextBox txtSumAmount;
			private TextBox txtTenThuoc;
		#endregion
		
		#region Constructors
		
			public frmEnterStock ()
			
			{
				this.flag = 1;
				this.db = new Database_Com ();
				this.components = ((System.ComponentModel.Container) null);
				this.count = 1;
				this.InitializeComponent ();
				this.con = Connection.ConnectionString ();
				this.dt = new DataTable ("ImportMedicineList");
				DataColumn theDataColumn = this.dt.Columns.Add ("STT");
				DataColumn theDataColumn2 = this.dt.Columns.Add ("Tên Thuốc");
				DataColumn theDataColumn3 = this.dt.Columns.Add ("SL Nhập");
				DataColumn theDataColumn4 = this.dt.Columns.Add ("ĐV Tính");
                DataColumn theDataColumn5 = this.dt.Columns.Add("Đổi Đơn Vị");
                DataColumn theDataColumn6 = this.dt.Columns.Add("ĐV Chuẩn");
                DataColumn theDataColumn7 = this.dt.Columns.Add("Cũ/Mới");
				DataColumn theDataColumn8 = this.dt.Columns.Add ("ISN");
				this.ds = new DataSet ();
				return;
			}
			
		#endregion
		
		#region Methods
		
			private void btAdd_Click (object sender, EventArgs e)
			
			{
				DataRow theDataRow;
				ArrayList theArrayList;
				if (! this.check ())
				{
					goto L_0248;
				}
				
			L_000D:
				
				{
				}
				this.txtDViChuan_Leave (sender, e);
				theDataRow = this.dt.NewRow ();
				theArrayList = new ArrayList ();
				int i = theArrayList.Add ((this.count = (this.dt.Rows.Count + 1)).ToString ());
				if (this.txtNewMedicine.Text == "")
				{
					goto L_007A;
				}
				int i2 = theArrayList.Add (this.txtNewMedicine.Text);
				
			L_007A:
				
				{
				}
				if (this.txtNewMedicine.Text != "")
				{
					goto L_00A8;
				}
				int i3 = theArrayList.Add (this.cboSick.SelectedItem.ToString ());
				
			L_00A8:
				
				{
				}
				int i4 = theArrayList.Add (this.txtAmount.Text);
				int i5 = theArrayList.Add (this.txtDonVi.Text);
				int i6 = theArrayList.Add (this.txtDViChuan.Text);
				int i7 = theArrayList.Add (this.cboMucChuan.SelectedItem.ToString ());
				if (this.txtNewMedicine.Text == "")
				{
					goto L_0124;
				}
				int i8 = theArrayList.Add ("0");
				int i9 = theArrayList.Add ("0");
				
			L_0124:
				
				{
				}
				if (this.txtNewMedicine.Text != "")
				{
					goto L_0159;
				}
				int i10 = theArrayList.Add ("1");
				int i11 = theArrayList.Add (this.txtISN.Text);
				
			L_0159:
				
				{
				}
				theDataRow[0] = theArrayList[0];
				theDataRow[1] = theArrayList[1];
				theDataRow[2] = theArrayList[2];
				theDataRow[3] = theArrayList[3];
				theDataRow[4] = theArrayList[4];
				theDataRow[5] = theArrayList[5];
				theDataRow[6] = theArrayList[6];
				theDataRow[7] = theArrayList[7];
				this.dt.Rows.Add (theDataRow);
				this.loadDataSet ();
				this.txtNewMedicine.Text = "";
				this.cboMucChuan.SelectedIndex = 0;
				this.txtSumAmount.Text = "";
				this.txtAmount.Text = "";
				this.txtDonVi.Text = "";
				this.txtDViChuan.Text = "";
				this.cboSick.SelectedIndex = 0;
				
			L_0248:
				return;
			}
			
			private void btSave_Click (object sender, EventArgs e)
			
			{
				int i;
				string theString;
				string theString2;
				string theString3;
				string theString4;
				string theString5;
				string theString6;
				string[] theStringArray;
				SqlDbType[] theSqlDbTypeArray;
				object[] theObjectArray;
				if (this.dataGrid1.DataSource == null)
				{
					goto L_02AE;
				}
				
			L_0012:
				
				{
				}
				if (this.ds.Tables["ImportMedicineList"].Rows.Count == 0)
				{
					goto L_02AE;
				}
				
			L_0038:
				
				{
				}
				i = 0;
				goto L_026E;
				
			L_003F:
				
				{
				}
				theString = this.ds.Tables["ImportMedicineList"].Rows[i][1].ToString ();
				theString2 = this.ds.Tables["ImportMedicineList"].Rows[i][2].ToString ();
				theString3 = this.ds.Tables["ImportMedicineList"].Rows[i][3].ToString ();
				theString4 = this.ds.Tables["ImportMedicineList"].Rows[i][4].ToString ();
				theString5 = this.ds.Tables["ImportMedicineList"].Rows[i][5].ToString ();
				theString6 = this.ds.Tables["ImportMedicineList"].Rows[i]["ISN"].ToString ();
                if (theString5 != "viên")
				{
					goto L_0163;
				}
				theString5 = "0";
				
			L_0163:
				
				{
				}
                if (theString5 != "ống")
				{
					goto L_0178;
				}
				theString5 = "1";
				
			L_0178:
				
				{
				}
				if (theString5 != "chai")
				{
					goto L_018D;
				}
				theString5 = "2";
				
			L_018D:
				
				{
				}
                if (theString5 != "gói")
				{
					goto L_01A2;
				}
				theString5 = "3";
				
			L_01A2:
				
				{
				}
                if (theString5 != "tuýp")
				{
					goto L_01B7;
				}
				theString5 = "4";
				
			L_01B7:
				
				{
				}
				SqlConnection theSqlConnection = this.db.CreateConnections ();
				theStringArray = new string[6];
				theStringArray[0] = "@mimID";
				theStringArray[1] = "@mimMedicineName";
				theStringArray[2] = "@mimQuantity";
				theStringArray[3] = "@mimProductionUnit";
				theStringArray[4] = "@mimQuantityPerUnit";
				theStringArray[5] = "@mimProductionPerUnit";
				theSqlDbTypeArray = new SqlDbType[6];
				theSqlDbTypeArray[0] = SqlDbType.VarChar;
				theSqlDbTypeArray[1] = SqlDbType.NVarChar;
				theSqlDbTypeArray[2] = SqlDbType.Int;
				theSqlDbTypeArray[3] = SqlDbType.NVarChar;
				theSqlDbTypeArray[4] = SqlDbType.Int;
				theSqlDbTypeArray[5] = SqlDbType.TinyInt;
				theObjectArray = new object[6];
				theObjectArray[0] = theString6;
				theObjectArray[1] = theString;
				theObjectArray[2] = theString2;
				theObjectArray[3] = theString3;
				theObjectArray[4] = theString4;
				theObjectArray[5] = theString5;
				this.db.ExecuteStoredProc ("sp_MedicineImport_Insert", theStringArray, theSqlDbTypeArray, theObjectArray);
				i++;
				
			L_026E:
				
				{
				}
				if (i < this.ds.Tables["ImportMedicineList"].Rows.Count)
				{
					goto L_003F;
				}
                DialogResult theDialogResult = MessageBox.Show("Thuốc đã Nhập Kho", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				this.btThoat_Click (sender, e);
				
			L_02AE:
				return;
			}
			
			private void btThoat_Click (object sender, EventArgs e)
			
			{
				base.Close ();
				return;
			}
			
			private void btUpdate_Click (object sender, EventArgs e)
			
			{
				int i;
				if (this.dataGrid1.DataSource == null)
				{
					goto L_0303;
				}
				
			L_0012:
				
				{
				}
				if (this.ds.Tables["ImportMedicineList"].Rows.Count == 0)
				{
					goto L_0303;
				}
				
			L_0038:
				
				{
				}
				if (this.txtAmount.Text != "")
				{
					goto L_0067;
				}
                DialogResult theDialogResult = MessageBox.Show("Vui lòng chọn tên thuốc từ danh sách nhập", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_0303;
				
			L_0067:
				
				{
				}
				if (! this.check ())
				{
					goto L_0303;
				}
				
			L_0074:
				
				{
				}
				i = 0;
				goto L_0276;
				
			L_007B:
				
				{
				}
				if (this.ds.Tables["ImportMedicineList"].Rows[i]["STT"].ToString () != this.txtSTT.Text)
				{
					goto L_0272;
				}
				if (this.txtNewMedicine.Text == "")
				{
					goto L_0139;
				}
				this.ds.Tables["ImportMedicineList"].Rows[i][1] = this.txtNewMedicine.Text;
				this.ds.Tables["ImportMedicineList"].Rows[i]["ISN"] = 0;
				goto L_01A9;
				
			L_0139:
				
				{
				}
				this.ds.Tables["ImportMedicineList"].Rows[i][1] = this.cboSick.SelectedItem.ToString ();
				this.ds.Tables["ImportMedicineList"].Rows[i]["ISN"] = this.cboISN.SelectedValue.ToString ();
				
			L_01A9:
				
				{
				}
				this.ds.Tables["ImportMedicineList"].Rows[i][2] = this.txtAmount.Text;
				this.ds.Tables["ImportMedicineList"].Rows[i][3] = this.txtDonVi.Text;
				this.ds.Tables["ImportMedicineList"].Rows[i][4] = this.txtDViChuan.Text;
				this.ds.Tables["ImportMedicineList"].Rows[i][5] = this.cboMucChuan.SelectedItem.ToString ();
				
			L_0272:
				
				{
				}
				i++;
				
			L_0276:
				
				{
				}
				if (i < this.ds.Tables["ImportMedicineList"].Rows.Count)
				{
					goto L_007B;
				}
				this.txtNewMedicine.Text = "";
				this.cboMucChuan.SelectedIndex = 0;
				this.txtSumAmount.Text = "";
				this.txtAmount.Text = "";
				this.txtDonVi.Text = "";
				this.txtDViChuan.Text = "";
				this.cboSick.SelectedIndex = 0;
				
			L_0303:
				return;
			}
			
			private void btXoa_Click (object sender, EventArgs e)
			
			{
				int i;
				if (this.dataGrid1.DataSource == null)
				{
					goto L_018F;
				}
				
			L_0012:
				
				{
				}
				if (this.ds.Tables["ImportMedicineList"].Rows.Count == 0)
				{
					goto L_018F;
				}
				
			L_0038:
				
				{
				}
				if (this.txtAmount.Text != "")
				{
					goto L_0067;
				}
                DialogResult theDialogResult = MessageBox.Show("Vui lòng chọn tên thuốc từ danh sách nhập", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_018F;
				
			L_0067:
				
				{
				}
				this.ds.Tables["ImportMedicineList"].Rows[this.dataGrid1.CurrentRowIndex].Delete ();
				i = 0;
				goto L_0102;
				
			L_009A:
				
				{
				}
				if (this.ds.Tables["ImportMedicineList"].Rows.Count != 0)
				{
					goto L_00CC;
				}
				this.dataGrid1.DataSource = null;
				goto L_018F;
				
			L_00CC:
				
				{
				}
				this.ds.Tables["ImportMedicineList"].Rows[i]["STT"] = (i + 1);
				i++;
				
			L_0102:
				
				{
				}
				if (i < this.ds.Tables["ImportMedicineList"].Rows.Count)
				{
					goto L_009A;
				}
				this.txtNewMedicine.Text = "";
				this.cboMucChuan.SelectedIndex = 0;
				this.txtSumAmount.Text = "";
				this.txtAmount.Text = "";
				this.txtDonVi.Text = "";
				this.txtDViChuan.Text = "";
				this.cboSick.SelectedIndex = 0;
				
			L_018F:
				return;
			}
			
			private void cboMucChuan_SelectedIndexChanged (object sender, EventArgs e)
			
			{
				if (this.txtDViChuan.Text.Trim () != "1")
				{
					goto L_0053;
				}
                if (this.cboMucChuan.SelectedItem.ToString() == "-Chọn-")
				{
					goto L_0053;
				}
				this.txtDonVi.Text = this.cboMucChuan.SelectedItem.ToString ();
				
			L_0053:
				return;
			}
			
			private void cboSick_SelectedIndexChanged (object sender, EventArgs e)
			
			{
				DataSet theDataSet;
				string theString;
                if (this.cboSick.SelectedItem.ToString() == "--------Chọn-------")
				{
					goto L_01BA;
				}
				this.txtNewMedicine.Enabled = false;
				this.txtNewMedicine.Text = "";
				this.cboISN.SelectedIndex = (this.cboSick.SelectedIndex - 1);
				SqlConnection theSqlConnection = this.db.CreateConnections ();
				theDataSet = this.db.Exc_Query (string.Concat ("select mimProductionPerUnit,mesQuantityInStock from vw_MedicineStock where mimID"
				+ " = \'", this.cboISN.SelectedValue.ToString (), "\'"));
				theString = theDataSet.Tables[0].Rows[0][0].ToString ();
				if (theString != "0")
				{
					goto L_00CA;
				}
                this.cboMucChuan.SelectedItem = "viên";
				
			L_00CA:
				
				{
				}
				if (theString != "1")
				{
					goto L_00E7;
				}
                this.cboMucChuan.SelectedItem = "ống";
				
			L_00E7:
				
				{
				}
				if (theString != "2")
				{
					goto L_0104;
				}
				this.cboMucChuan.SelectedItem = "chai";
				
			L_0104:
				
				{
				}
				if (theString != "3")
				{
					goto L_0121;
				}
                this.cboMucChuan.SelectedItem = "gói";
				
			L_0121:
				
				{
				}
				if (theString != "4")
				{
					goto L_013E;
				}
                this.cboMucChuan.SelectedItem = "tuýp";
				
			L_013E:
				
				{
				}
				this.txtSoLuongTonKho.Enabled = true;
				this.txtSoLuongTonKho.Text = string.Concat (theDataSet.Tables[0].Rows[0][1].ToString (), " ", this.cboMucChuan.SelectedItem.ToString ());
				this.txtISN.Text = this.cboISN.SelectedValue.ToString ();
				this.cboMucChuan.Enabled = false;
				goto L_01FE;
				
			L_01BA:
				
				{
				}
				this.txtSoLuongTonKho.Text = "";
				this.txtSoLuongTonKho.Enabled = false;
				this.txtNewMedicine.Enabled = true;
				this.txtISN.Text = "0";
				this.cboMucChuan.Enabled = true;
				
			L_01FE:
				return;
			}
			
			public bool check ()
			
			{
				bool theBoolean;
				if (this.cboSick.Text != "")
				{
					goto L_0048;
				}
				if (this.txtNewMedicine.Text != "")
				{
					goto L_0048;
				}
                DialogResult theDialogResult = MessageBox.Show("Vui lòng chọn tên thuốc hoặc nhập tên thuốc mới", "Lỗi Nhập", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_01B3;
				
			L_0048:
				
				{
				}
				if (this.cboSick.SelectedItem.ToString () != "--------Chọn-------")
				{
					goto L_0095;
				}
				if (this.txtNewMedicine.Text != "")
				{
					goto L_0095;
				}
                DialogResult theDialogResult2 = MessageBox.Show("Vui lòng chọn tên thuốc hoặc nhập tên thuốc mới", "Lỗi Nhập", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_01B3;
				
			L_0095:
				
				{
				}
				if (this.txtAmount.Text != "")
				{
					goto L_00C6;
				}
                DialogResult theDialogResult3 = MessageBox.Show("Vui lòng nhập số lượng", "Lỗi Nhập", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_01B3;
				
			L_00C6:
				
				{
				}
				if (this.txtDonVi.Text != "")
				{
					goto L_00F7;
				}
                DialogResult theDialogResult4 = MessageBox.Show("Vui lòng nhập đơn vị tính", "Lỗi Nhập", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_01B3;
				
			L_00F7:
				
				{
				}
				if (this.txtDViChuan.Text != "")
				{
					goto L_0128;
				}
                DialogResult theDialogResult5 = MessageBox.Show("Vui lòng nhập số lượng / đơn vị chuẩn ", "Lỗi Nhập", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_01B3;
				
			L_0128:
				
				{
				}
				if (this.cboMucChuan.SelectedItem.ToString () != "-Chọn-")
				{
					goto L_015B;
				}
                DialogResult theDialogResult6 = MessageBox.Show("Vui lòng chọn đơn vị chuẩn ", "Lỗi Nhập", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_01B3;
				
			L_015B:
				
				{
				}
				if (this.IsNo (this.txtAmount.Text))
				{
					goto L_0185;
				}
                DialogResult theDialogResult7 = MessageBox.Show("Vui lòng nhập kiểu số cho số lượng", "Lỗi Nhập", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_01B3;
				
			L_0185:
				
				{
				}
				if (this.IsNo (this.txtDViChuan.Text))
				{
					goto L_01AF;
				}
                DialogResult theDialogResult8 = MessageBox.Show("Vui lòng nhập kiểu số cho số 1 đơn vị", "Lỗi Nhập", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				theBoolean = false;
				goto L_01B3;
				
			L_01AF:
				
				{
				}
				theBoolean = true;
				goto L_01B3;
				
			L_01B3:
				
				{
				}
				return theBoolean;
			}
			
			private void dataGrid1_MouseUp (object sender, MouseEventArgs e)
			
			{
				DataGrid.HitTestInfo theHitTestInfo;
				if (this.dataGrid1.DataSource == null)
				{
					goto L_02C8;
				}
				
			L_0012:
				
				{
				}
				if (e.Button != MouseButtons.Left)
				{
					goto L_02C8;
				}
				theHitTestInfo = this.dataGrid1.HitTest (e.X, e.Y);
				if (theHitTestInfo.Type != System.Windows.Forms.DataGrid.HitTestType.RowHeader)
				{
					goto L_02C8;
				}
                this.cboMucChuan.SelectedItem = this.ds.Tables["ImportMedicineList"].Rows[this.dataGrid1.CurrentRowIndex]["ĐV Chuẩn"].ToString();
                this.txtAmount.Text = this.ds.Tables["ImportMedicineList"].Rows[this.dataGrid1.CurrentRowIndex]["SL Nhập"].ToString();
                this.txtDonVi.Text = this.ds.Tables["ImportMedicineList"].Rows[this.dataGrid1.CurrentRowIndex]["ĐV Tính"].ToString();
                this.txtDViChuan.Text = this.ds.Tables["ImportMedicineList"].Rows[this.dataGrid1.CurrentRowIndex]["Đổi Đơn Vị"].ToString();
				this.txtSTT.Text = this.ds.Tables["ImportMedicineList"].Rows[this.dataGrid1.CurrentRowIndex]["STT"].ToString ();
                if (this.ds.Tables["ImportMedicineList"].Rows[this.dataGrid1.CurrentRowIndex]["Cũ/Mới"].ToString() != "0")
				{
					goto L_0238;
				}
                this.txtNewMedicine.Text = this.ds.Tables["ImportMedicineList"].Rows[this.dataGrid1.CurrentRowIndex]["Tên Thuốc"].ToString();
				this.txtISN.Text = "0";
				goto L_02C0;
				
			L_0238:
				
				{
				}
                this.cboSick.SelectedItem = this.ds.Tables["ImportMedicineList"].Rows[this.dataGrid1.CurrentRowIndex]["Tên Thuốc"].ToString();
				this.txtISN.Text = this.ds.Tables["ImportMedicineList"].Rows[this.dataGrid1.CurrentRowIndex]["ISN"].ToString ();
				
			L_02C0:
				
				{
				}
				this.txtDViChuan_Leave (sender, ((EventArgs) e));
				
			L_02C8:
				return;
			}
			
			protected override void Dispose (bool disposing)
			
			{
				this.flag = 0;
				if (! disposing)
				{
					goto L_001D;
				}
				if (this.components == null)
				{
					goto L_001D;
				}
				this.components.Dispose ();
				
			L_001D:
				
				{
				}
				base.Dispose (disposing);
				return;
			}
			
			private void frmEnterStock_Load (object sender, EventArgs e)
			
			{
				SqlConnection theSqlConnection;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				int i;
                int i2 = this.cboMucChuan.Items.Add("-Chọn-");
                int i3 = this.cboMucChuan.Items.Add("viên");
				int i4 = this.cboMucChuan.Items.Add ("ống");
				int i5 = this.cboMucChuan.Items.Add ("chai");
                int i6 = this.cboMucChuan.Items.Add("gói");
                int i7 = this.cboMucChuan.Items.Add("tuýp");
				this.cboMucChuan.SelectedIndex = 0;
				theSqlConnection = new SqlConnection (this.con);
				theSqlDataAdapter = new SqlDataAdapter ("Select distinct * from vw_MedicineStock order by mesMedicineName", theSqlConnection);
				theDataSet = new DataSet ();
				int i8 = theSqlDataAdapter.Fill (theDataSet, "MedicineImport");
                int i9 = this.cboSick.Items.Add("--------Chọn-------");
				if ((theDataSet != null) && ((theDataSet.Tables.Count != 0) && (theDataSet.Tables[0].Rows.Count != 0)))
				{
					goto L_00FE;
				}
				
			L_00F9:
				
				{
				}
				goto L_018E;
				
			L_00FE:
				
				{
				}
				i = 0;
				goto L_013D;
				
			L_0102:
				
				{
				}
				int i10 = this.cboSick.Items.Add (theDataSet.Tables[0].Rows[i]["mesMedicineName"].ToString ());
				i++;
				
			L_013D:
				
				{
				}
				if (i < theDataSet.Tables[0].Rows.Count)
				{
					goto L_0102;
				}
				this.cboSick.SelectedIndex = 0;
				this.cboISN.DataSource = theDataSet;
				this.cboISN.DisplayMember = "MedicineImport.mesMedicineName";
				this.cboISN.ValueMember = "MedicineImport.mimID";
				
			L_018E:
				return;
			}
			
			private void ID_Validate (object sender, KeyPressEventArgs e)
			
			{
				if (char.IsNumber (e.KeyChar))
				{
					goto L_0027;
				}
				if (e.KeyChar == '\u0008')
				{
					goto L_0027;
				}
				if (e.KeyChar == '\r')
				{
					goto L_0027;
				}
				e.Handled = true;
				
			L_0027:
				
				{
				}
				goto L_0029;
				
			L_0029:
				return;
			}
			
			private void InitializeComponent ()
			
			{
				ResourceManager theResourceManager;
				Control[] theControlArray;
				theResourceManager = new ResourceManager (typeof (frmEnterStock));
				this.label3 = new Label ();
				this.txtNewMedicine = new TextBox ();
				this.txtAmount = new TextBox ();
				this.txtDonVi = new TextBox ();
				this.txtSumAmount = new TextBox ();
				this.label2 = new Label ();
				this.label4 = new Label ();
				this.label5 = new Label ();
				this.label6 = new Label ();
				this.label7 = new Label ();
				this.dataGrid1 = new DataGrid ();
				this.txtDViChuan = new TextBox ();
				this.txtSTT = new TextBox ();
				this.btExit = new Button ();
				this.btSave = new Button ();
				this.btXoa = new Button ();
				this.btUpdate = new Button ();
				this.btAdd = new Button ();
				this.cboSick = new ComboBox ();
				this.cboMucChuan = new ComboBox ();
				this.txtISN = new TextBox ();
				this.cboISN = new ComboBox ();
				this.linkTenThuoc = new LinkLabel ();
				this.txtTenThuoc = new TextBox ();
				this.txtSoLuongTonKho = new TextBox ();
				this.label1 = new Label ();
				((ISupportInitialize) this.dataGrid1).BeginInit ();
				base.SuspendLayout ();
				this.label3.Font = new System.Drawing.Font ("Verdana", 12F, FontStyle.Bold, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label3.ForeColor = Color.MediumBlue;
				this.label3.Location = new Point (288, 8);
				this.label3.Name = "label3";
				this.label3.Size = new System.Drawing.Size (120, 23);
				this.label3.TabIndex = 42;
                this.label3.Text = "Nhập Thuốc";
				this.txtNewMedicine.BorderStyle = BorderStyle.FixedSingle;
				this.txtNewMedicine.Font = new System.Drawing.Font ("Verdana", 9.75F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.txtNewMedicine.Location = new Point (176, 70);
				this.txtNewMedicine.Name = "txtNewMedicine";
				this.txtNewMedicine.Size = new System.Drawing.Size (192, 23);
				this.txtNewMedicine.TabIndex = 2;
				this.txtNewMedicine.Text = "";
				this.txtNewMedicine.TextChanged += new EventHandler (this.txtNewMedicine_TextChanged);
				this.txtAmount.BorderStyle = BorderStyle.FixedSingle;
				this.txtAmount.Font = new System.Drawing.Font ("Verdana", 9.75F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.txtAmount.Location = new Point (176, 128);
				this.txtAmount.Name = "txtAmount";
				this.txtAmount.Size = new System.Drawing.Size (104, 23);
				this.txtAmount.TabIndex = 3;
				this.txtAmount.Text = "";
				this.txtAmount.KeyPress += new KeyPressEventHandler (this.ID_Validate);
				this.txtAmount.Leave += new EventHandler (this.txtAmount_Leave);
				this.txtDonVi.BorderStyle = BorderStyle.FixedSingle;
				this.txtDonVi.Font = new System.Drawing.Font ("Verdana", 9.75F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.txtDonVi.Location = new Point (464, 40);
				this.txtDonVi.Name = "txtDonVi";
				this.txtDonVi.Size = new System.Drawing.Size (120, 23);
				this.txtDonVi.TabIndex = 4;
				this.txtDonVi.Text = "";
				this.txtDonVi.TextChanged += new EventHandler (this.txtDonVi_TextChanged);
				this.txtSumAmount.BorderStyle = BorderStyle.FixedSingle;
				this.txtSumAmount.Font = new System.Drawing.Font ("Verdana", 9.75F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.txtSumAmount.ForeColor = SystemColors.HotTrack;
				this.txtSumAmount.Location = new Point (464, 99);
				this.txtSumAmount.Name = "txtSumAmount";
				this.txtSumAmount.Size = new System.Drawing.Size (120, 23);
				this.txtSumAmount.TabIndex = 7;
				this.txtSumAmount.Text = "";
				this.txtSumAmount.KeyPress += new KeyPressEventHandler (this.txtSumAmount_KeyPress);
				this.label2.Location = new Point (61, 72);
				this.label2.Name = "label2";
				this.label2.Size = new System.Drawing.Size (112, 16);
				this.label2.TabIndex = 52;
                this.label2.Text = "Tên thuốc mới :";
				this.label4.Location = new Point (60, 103);
				this.label4.Name = "label4";
				this.label4.Size = new System.Drawing.Size (112, 16);
				this.label4.TabIndex = 53;
                this.label4.Text = "Số lượng tồn:";
				this.label4.TextAlign = ContentAlignment.MiddleRight;
				this.label5.Location = new Point (291, 104);
				this.label5.Name = "label5";
				this.label5.Size = new System.Drawing.Size (176, 16);
				this.label5.TabIndex = 54;
                this.label5.Text = "Tổng SL theo đv chuẩn :";
				this.label6.Location = new Point (416, 72);
				this.label6.Name = "label6";
				this.label6.Size = new System.Drawing.Size (48, 16);
				this.label6.TabIndex = 55;
                this.label6.Text = "1 ĐV :";
				this.label7.Location = new Point (376, 43);
				this.label7.Name = "label7";
				this.label7.Size = new System.Drawing.Size (96, 16);
				this.label7.TabIndex = 56;
                this.label7.Text = "Đơn vị tính :";
				this.dataGrid1.BackgroundColor = SystemColors.ActiveCaptionText;
				this.dataGrid1.CaptionVisible = false;
				this.dataGrid1.DataMember = "";
				this.dataGrid1.HeaderForeColor = SystemColors.ControlText;
				this.dataGrid1.Location = new Point (16, 160);
				this.dataGrid1.Name = "dataGrid1";
				this.dataGrid1.ReadOnly = true;
				this.dataGrid1.Size = new System.Drawing.Size (664, 272);
				this.dataGrid1.TabIndex = 11;
				this.dataGrid1.MouseUp += new MouseEventHandler (this.dataGrid1_MouseUp);
				this.txtDViChuan.BorderStyle = BorderStyle.FixedSingle;
				this.txtDViChuan.Font = new System.Drawing.Font ("Verdana", 9.75F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.txtDViChuan.Location = new Point (464, 70);
				this.txtDViChuan.Name = "txtDViChuan";
				this.txtDViChuan.Size = new System.Drawing.Size (39, 23);
				this.txtDViChuan.TabIndex = 5;
				this.txtDViChuan.Text = "";
				this.txtDViChuan.KeyPress += new KeyPressEventHandler (this.ID_Validate);
				this.txtDViChuan.Leave += new EventHandler (this.txtDViChuan_Leave);
				this.txtSTT.BorderStyle = BorderStyle.FixedSingle;
				this.txtSTT.Font = new System.Drawing.Font ("Verdana", 9.75F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.txtSTT.Location = new Point (456, 8);
				this.txtSTT.Name = "txtSTT";
				this.txtSTT.Size = new System.Drawing.Size (104, 23);
				this.txtSTT.TabIndex = 58;
				this.txtSTT.Text = "";
				this.txtSTT.Visible = false;
				this.btExit.FlatStyle = FlatStyle.Popup;
				this.btExit.Location = new Point (599, 440);
				this.btExit.Name = "btExit";
				this.btExit.Size = new System.Drawing.Size (80, 23);
				this.btExit.TabIndex = 13;
				this.btExit.Text = "Thoát";
				this.btExit.Click += new EventHandler (this.btThoat_Click);
				this.btSave.FlatStyle = FlatStyle.Popup;
				this.btSave.Location = new Point (511, 440);
				this.btSave.Name = "btSave";
				this.btSave.Size = new System.Drawing.Size (80, 23);
				this.btSave.TabIndex = 12;
				this.btSave.Text = "Lưu";
				this.btSave.Click += new EventHandler (this.btSave_Click);
				this.btXoa.FlatStyle = FlatStyle.Popup;
				this.btXoa.Location = new Point (552, 128);
				this.btXoa.Name = "btXoa";
				this.btXoa.Size = new System.Drawing.Size (80, 23);
				this.btXoa.TabIndex = 10;
				this.btXoa.Text = "Xóa";
				this.btXoa.Click += new EventHandler (this.btXoa_Click);
				this.btUpdate.FlatStyle = FlatStyle.Popup;
				this.btUpdate.Location = new Point (464, 128);
				this.btUpdate.Name = "btUpdate";
				this.btUpdate.Size = new System.Drawing.Size (80, 23);
				this.btUpdate.TabIndex = 9;
				this.btUpdate.Text = "Cập Nhật ";
				this.btUpdate.Click += new EventHandler (this.btUpdate_Click);
				this.btAdd.FlatStyle = FlatStyle.Popup;
				this.btAdd.Location = new Point (376, 128);
				this.btAdd.Name = "btAdd";
				this.btAdd.Size = new System.Drawing.Size (80, 23);
				this.btAdd.TabIndex = 8;
				this.btAdd.Text = "Nhập";
				this.btAdd.Click += new EventHandler (this.btAdd_Click);
				this.cboSick.DropDownStyle = ComboBoxStyle.DropDownList;
				this.cboSick.Location = new Point (176, 40);
				this.cboSick.Name = "cboSick";
				this.cboSick.Size = new System.Drawing.Size (192, 24);
				this.cboSick.TabIndex = 1;
				this.cboSick.SelectedIndexChanged += new EventHandler (this.cboSick_SelectedIndexChanged);
				this.cboMucChuan.DropDownStyle = ComboBoxStyle.DropDownList;
				this.cboMucChuan.ForeColor = SystemColors.HotTrack;
				this.cboMucChuan.Location = new Point (504, 70);
				this.cboMucChuan.Name = "cboMucChuan";
				this.cboMucChuan.Size = new System.Drawing.Size (80, 24);
				this.cboMucChuan.TabIndex = 6;
				this.cboMucChuan.SelectedIndexChanged += new EventHandler (this.cboMucChuan_SelectedIndexChanged);
				this.txtISN.BorderStyle = BorderStyle.FixedSingle;
				this.txtISN.Font = new System.Drawing.Font ("Verdana", 9.75F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.txtISN.Location = new Point (568, 8);
				this.txtISN.Name = "txtISN";
				this.txtISN.Size = new System.Drawing.Size (36, 23);
				this.txtISN.TabIndex = 66;
				this.txtISN.Text = "";
				this.txtISN.Visible = false;
				this.cboISN.DropDownStyle = ComboBoxStyle.DropDownList;
				this.cboISN.Location = new Point (592, 98);
				this.cboISN.Name = "cboISN";
				this.cboISN.Size = new System.Drawing.Size (80, 24);
				this.cboISN.TabIndex = 67;
				this.cboISN.Visible = false;
				this.linkTenThuoc.Location = new Point (72, 40);
				this.linkTenThuoc.Name = "linkTenThuoc";
				this.linkTenThuoc.TabIndex = 69;
				this.linkTenThuoc.TabStop = true;
				this.linkTenThuoc.Text = "Tên Thuốc :";
				this.linkTenThuoc.TextAlign = ContentAlignment.MiddleRight;
				this.linkTenThuoc.LinkClicked += new LinkLabelLinkClickedEventHandler (this.linkTenThuoc_LinkClicked);
				this.txtTenThuoc.BorderStyle = BorderStyle.FixedSingle;
				this.txtTenThuoc.ForeColor = SystemColors.HotTrack;
				this.txtTenThuoc.Location = new Point (176, 40);
				this.txtTenThuoc.Name = "txtTenThuoc";
				this.txtTenThuoc.Size = new System.Drawing.Size (192, 23);
				this.txtTenThuoc.TabIndex = 68;
				this.txtTenThuoc.Text = "";
				this.txtTenThuoc.Visible = false;
				this.txtTenThuoc.KeyPress += new KeyPressEventHandler (this.txtTenThuoc_KeyPress);
				this.txtTenThuoc.Leave += new EventHandler (this.txtTenThuoc_Leave);
				this.txtSoLuongTonKho.BorderStyle = BorderStyle.FixedSingle;
				this.txtSoLuongTonKho.Font = new System.Drawing.Font ("Verdana", 9.75F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.txtSoLuongTonKho.Location = new Point (176, 99);
				this.txtSoLuongTonKho.Name = "txtSoLuongTonKho";
				this.txtSoLuongTonKho.Size = new System.Drawing.Size (104, 23);
				this.txtSoLuongTonKho.TabIndex = 70;
				this.txtSoLuongTonKho.Text = "";
				this.txtSoLuongTonKho.KeyPress += new KeyPressEventHandler (this.txtSumAmount_KeyPress);
				this.label1.Location = new Point (62, 131);
				this.label1.Name = "label1";
				this.label1.Size = new System.Drawing.Size (112, 16);
				this.label1.TabIndex = 71;
                this.label1.Text = "Số lượng nhập:";
				this.label1.TextAlign = ContentAlignment.MiddleRight;
				this.AutoScaleBaseSize = new System.Drawing.Size (7, 16);
				base.ClientSize = new System.Drawing.Size (688, 467);
				theControlArray = new Control[26];
				theControlArray[0] = ((Control) this.txtSoLuongTonKho);
				theControlArray[1] = ((Control) this.label1);
				theControlArray[2] = ((Control) this.linkTenThuoc);
				theControlArray[3] = ((Control) this.cboISN);
				theControlArray[4] = ((Control) this.txtISN);
				theControlArray[5] = ((Control) this.cboMucChuan);
				theControlArray[6] = ((Control) this.btAdd);
				theControlArray[7] = ((Control) this.btXoa);
				theControlArray[8] = ((Control) this.btUpdate);
				theControlArray[9] = ((Control) this.btExit);
				theControlArray[10] = ((Control) this.btSave);
				theControlArray[11] = ((Control) this.txtSTT);
				theControlArray[12] = ((Control) this.txtSumAmount);
				theControlArray[13] = ((Control) this.txtDViChuan);
				theControlArray[14] = ((Control) this.txtDonVi);
				theControlArray[15] = ((Control) this.label7);
				theControlArray[16] = ((Control) this.label6);
				theControlArray[17] = ((Control) this.label5);
				theControlArray[18] = ((Control) this.txtAmount);
				theControlArray[19] = ((Control) this.label4);
				theControlArray[20] = ((Control) this.txtNewMedicine);
				theControlArray[21] = ((Control) this.label2);
				theControlArray[22] = ((Control) this.label3);
				theControlArray[23] = ((Control) this.dataGrid1);
				theControlArray[24] = ((Control) this.txtTenThuoc);
				theControlArray[25] = ((Control) this.cboSick);
				base.Controls.AddRange (theControlArray);
				this.Font = new System.Drawing.Font ("Verdana", 9.75F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
				base.Icon = ((System.Drawing.Icon) theResourceManager.GetObject ("$this.Icon"));
				base.MaximizeBox = false;
				base.MinimizeBox = false;
				base.Name = "frmEnterStock";
				base.StartPosition = FormStartPosition.CenterScreen;
                this.Text = "Nhập Thuốc";
				base.Load += new EventHandler (this.frmEnterStock_Load);
				((ISupportInitialize) this.dataGrid1).EndInit ();
				base.ResumeLayout (false);
				return;
			}
			
			private bool IsNo (string Number)
			
			{
				bool theBoolean;
				
			L_0000:
				try
				{
					long theLong = long.Parse (Number);
					theBoolean = true;
				}
				catch
				{
					
				L_000B:
					
					{
					}
					theBoolean = false;
				}
				
			L_0010:
				
				{
				}
				return theBoolean;
			}
			
			public bool IsNumber (string text)
			
			{
				bool theBoolean;
				
			L_0000:
				try
				{
					long theLong = Convert.ToInt64 (text);
					theBoolean = true;
				}
				catch
				{
					
				L_000B:
					
					{
					}
					theBoolean = false;
				}
				
			L_0010:
				
				{
				}
				return theBoolean;
			}
			
			private void linkTenThuoc_LinkClicked (object sender, LinkLabelLinkClickedEventArgs e)
			
			{
				if (! this.cboSick.Visible)
				{
					goto L_0027;
				}
				this.cboSick.Visible = false;
				this.txtTenThuoc.Visible = true;
				goto L_003F;
				
			L_0027:
				
				{
				}
				this.cboSick.Visible = true;
				this.txtTenThuoc.Visible = false;
				
			L_003F:
				return;
			}
			
			public void loadDataGrid ()
			
			{
				DataGridTableStyle theDataGridTableStyle;
				DataGridTextBoxColumn theDataGridTextBoxColumn;
				DataGridTextBoxColumn theDataGridTextBoxColumn2;
				DataGridTextBoxColumn theDataGridTextBoxColumn3;
				DataGridTextBoxColumn theDataGridTextBoxColumn4;
				DataGridTextBoxColumn theDataGridTextBoxColumn5;
				DataGridTextBoxColumn theDataGridTextBoxColumn6;
				DataGridTextBoxColumn theDataGridTextBoxColumn7;
				DataGridTextBoxColumn theDataGridTextBoxColumn8;
				theDataGridTableStyle = new DataGridTableStyle ();
				theDataGridTableStyle.MappingName = "ImportMedicineList";
				theDataGridTableStyle.AlternatingBackColor = Color.AliceBlue;
				theDataGridTableStyle.HeaderForeColor = Color.Maroon;
				theDataGridTableStyle.GridLineColor = Color.CornflowerBlue;
				theDataGridTextBoxColumn = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn.MappingName = "STT";
				theDataGridTextBoxColumn.HeaderText = "  STT";
				theDataGridTextBoxColumn.Width = 50;
				int i = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn));
				theDataGridTextBoxColumn.Alignment = HorizontalAlignment.Center;
				theDataGridTextBoxColumn2 = new DataGridTextBoxColumn ();
                theDataGridTextBoxColumn2.MappingName = "Tên Thuốc";
                theDataGridTextBoxColumn2.HeaderText = "           Tên Thuốc";
				theDataGridTextBoxColumn2.Width = 180;
				theDataGridTextBoxColumn2.NullText = string.Empty;
				int i2 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn2));
				theDataGridTextBoxColumn2.Alignment = HorizontalAlignment.Center;
				theDataGridTextBoxColumn3 = new DataGridTextBoxColumn ();
                theDataGridTextBoxColumn3.MappingName = "SL Nhập";
                theDataGridTextBoxColumn3.HeaderText = "     Số Lượng Nhập";
				theDataGridTextBoxColumn3.Width = 150;
				theDataGridTextBoxColumn3.NullText = string.Empty;
				theDataGridTextBoxColumn3.Alignment = HorizontalAlignment.Center;
				int i3 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn3));
				theDataGridTextBoxColumn4 = new DataGridTextBoxColumn ();
                theDataGridTextBoxColumn4.MappingName = "ĐV Tính";
                theDataGridTextBoxColumn4.HeaderText = "    ĐV Tính";
				theDataGridTextBoxColumn4.Width = 100;
				theDataGridTextBoxColumn4.NullText = string.Empty;
				theDataGridTextBoxColumn4.Alignment = HorizontalAlignment.Center;
				int i4 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn4));
				theDataGridTextBoxColumn5 = new DataGridTextBoxColumn ();
                theDataGridTextBoxColumn5.MappingName = "Đổi Đơn Vị";
                theDataGridTextBoxColumn5.HeaderText = "  Số Lượng/ 1 ĐV Chuẩn";
				theDataGridTextBoxColumn5.Width = 180;
				theDataGridTextBoxColumn5.NullText = string.Empty;
				theDataGridTextBoxColumn5.Alignment = HorizontalAlignment.Center;
				int i5 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn5));
				theDataGridTextBoxColumn6 = new DataGridTextBoxColumn ();
                theDataGridTextBoxColumn6.MappingName = "ĐV Chuẩn";
                theDataGridTextBoxColumn6.HeaderText = "  ĐV Chuẩn";
				theDataGridTextBoxColumn6.Width = 100;
				theDataGridTextBoxColumn6.NullText = string.Empty;
				theDataGridTextBoxColumn6.Alignment = HorizontalAlignment.Center;
				int i6 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn6));
				theDataGridTextBoxColumn7 = new DataGridTextBoxColumn ();
                theDataGridTextBoxColumn7.MappingName = "Cũ/Mới";
				theDataGridTextBoxColumn7.HeaderText = "";
				theDataGridTextBoxColumn7.Width = 0;
				theDataGridTextBoxColumn7.NullText = string.Empty;
				int i7 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn7));
				theDataGridTextBoxColumn8 = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn8.MappingName = "ISN";
				theDataGridTextBoxColumn8.HeaderText = "";
				theDataGridTextBoxColumn8.Width = 0;
				theDataGridTextBoxColumn8.NullText = string.Empty;
				int i8 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn8));
				int i9 = this.dataGrid1.TableStyles.Add (theDataGridTableStyle);
				theDataGridTableStyle.AllowSorting = false;
				return;
			}
			
			public void loadDataSet ()
			
			{
				this.ds.Tables.Clear ();
				this.ds.Tables.Add (this.dt);
				this.dataGrid1.TableStyles.Clear ();
				this.dataGrid1.DataSource = this.ds;
				this.dataGrid1.SetDataBinding (this.ds, "ImportMedicineList");
				this.loadDataGrid ();
				return;
			}
			
			private void txtAmount_Leave (object sender, EventArgs e)
			
			{
				if (this.txtDViChuan.Text == "")
				{
					goto L_0021;
				}
				
			L_0019:
				
				{
				}
				this.txtDViChuan_Leave (sender, e);
				
			L_0021:
				return;
			}
			
			private void txtDonVi_TextChanged (object sender, EventArgs e)
			
			{
				int i;
				if (this.txtDonVi.Text == "")
				{
					goto L_0052;
				}
				i = this.cboMucChuan.FindString (this.txtDonVi.Text);
				if (i < 1)
				{
					goto L_0052;
				}
				if (i > 4)
				{
					goto L_0052;
				}
				this.cboMucChuan.SelectedIndex = i;
				this.txtDViChuan.Text = "1";
				
			L_0052:
				return;
			}
			
			private void txtDViChuan_Leave (object sender, EventArgs e)
			
			{
				long theLong;
				if (this.txtAmount.Text != "")
				{
					goto L_002F;
				}
                DialogResult theDialogResult = MessageBox.Show("Vui lòng nhập số lượng", "Lỗi Nhập", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_01AD;
				
			L_002F:
				
				{
				}
				if (this.txtDViChuan.Text != "")
				{
					goto L_005E;
				}
                DialogResult theDialogResult2 = MessageBox.Show("Vui lòng nhập số lượng / đơn vị chuẩn ", "Lỗi Nhập", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_01AD;
				
			L_005E:
				
				{
				}
				if (this.IsNumber (this.txtAmount.Text))
				{
					goto L_00A5;
				}
                DialogResult theDialogResult3 = MessageBox.Show("Vui lòng nhập kiểu số cho số lượng thuốc nhập", "Lỗi Nhập", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				this.txtAmount.Text = "";
				bool theBoolean = this.txtAmount.Focus ();
				goto L_01AD;
				
			L_00A5:
				
				{
				}
				if (this.IsNumber (this.txtDViChuan.Text))
				{
					goto L_00EC;
				}
                DialogResult theDialogResult4 = MessageBox.Show("Vui lòng nhập kiểu số cho số lượng / 1 đơn vị chuẩn", "Lỗi Nhập", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				this.txtDViChuan.Text = "";
				bool theBoolean2 = this.txtDViChuan.Focus ();
				goto L_01AD;
				
			L_00EC:
				
				{
				}
				if (Convert.ToInt64 (this.txtAmount.Text) != ((long) 0))
				{
					goto L_0131;
				}
                DialogResult theDialogResult5 = MessageBox.Show("Vui lòng nhập số lượng thuốc nhập lớn hơn 0", "Lỗi Nhập", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				this.txtAmount.Text = "";
				bool theBoolean3 = this.txtAmount.Focus ();
				goto L_01AD;
				
			L_0131:
				
				{
				}
				if (Convert.ToInt64 (this.txtDViChuan.Text) != ((long) 0))
				{
					goto L_0176;
				}
                DialogResult theDialogResult6 = MessageBox.Show("Vui lòng nhập số lượng / 1 đơn vị chuẩn lớn hơn 0", "Lỗi Nhập", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				this.txtDViChuan.Text = "";
				bool theBoolean4 = this.txtDViChuan.Focus ();
				goto L_01AD;
				
			L_0176:
				
				{
				}
				theLong = 0L;
				this.txtSumAmount.Text = (theLong = (Convert.ToInt64 (this.txtAmount.Text) * Convert.ToInt64 (this.txtDViChuan.Text))).ToString ();
				
			L_01AD:
				return;
			}
			
			private void txtNewMedicine_TextChanged (object sender, EventArgs e)
			
			{
				if (this.txtNewMedicine.Text == "")
				{
					goto L_0031;
				}
				this.cboSick.SelectedIndex = 0;
				this.cboSick.Enabled = false;
				goto L_003D;
				
			L_0031:
				
				{
				}
				this.cboSick.Enabled = true;
				
			L_003D:
				return;
			}
			
			private void txtSumAmount_KeyPress (object sender, KeyPressEventArgs e)
			
			{
				e.Handled = true;
				return;
			}
			
			private void txtTenThuoc_KeyPress (object sender, KeyPressEventArgs e)
			
			{
				int i;
				if (e.KeyChar != '\r')
				{
					goto L_0060;
				}
				i = this.cboSick.FindString (this.txtTenThuoc.Text);
				if (i < 0)
				{
					goto L_004B;
				}
				this.cboSick.Visible = true;
				this.txtTenThuoc.Visible = false;
				this.cboSick.SelectedIndex = i;
				goto L_0060;
				
			L_004B:
				
				{
				}
                DialogResult theDialogResult = MessageBox.Show("Tên thuốc này không tồn tại", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_0060;
				
			L_0060:
				return;
			}
			
			private void txtTenThuoc_Leave (object sender, EventArgs e)
			
			{
				int i;
				i = this.cboSick.FindString (this.txtTenThuoc.Text);
				if (i < 0)
				{
					goto L_0041;
				}
				this.cboSick.Visible = true;
				this.txtTenThuoc.Visible = false;
				this.cboSick.SelectedIndex = i;
				goto L_0056;
				
			L_0041:
				
				{
				}
                DialogResult theDialogResult = MessageBox.Show("Tên thuốc này không tồn tại", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_0056;
				
			L_0056:
				return;
			}
			
		#endregion
	}
	
}

